<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - iris.info - /usr/include/c++/4.3/bits/vector.tcc</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../../../index.html">directory</a> - <a href="index.html">usr/include/c++/4.3/bits</a> - vector.tcc</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>iris.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2010-05-24</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">107</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">67.3 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">72</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : // Vector implementation (out of line) -*- C++ -*-
<span class="lineNum">       2 </span>                : 
<span class="lineNum">       3 </span>                : // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
<span class="lineNum">       4 </span>                : // Free Software Foundation, Inc.
<span class="lineNum">       5 </span>                : //
<span class="lineNum">       6 </span>                : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       7 </span>                : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       8 </span>                : // terms of the GNU General Public License as published by the
<span class="lineNum">       9 </span>                : // Free Software Foundation; either version 2, or (at your option)
<span class="lineNum">      10 </span>                : // any later version.
<span class="lineNum">      11 </span>                : 
<span class="lineNum">      12 </span>                : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      13 </span>                : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      14 </span>                : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      15 </span>                : // GNU General Public License for more details.
<span class="lineNum">      16 </span>                : 
<span class="lineNum">      17 </span>                : // You should have received a copy of the GNU General Public License along
<span class="lineNum">      18 </span>                : // with this library; see the file COPYING.  If not, write to the Free
<span class="lineNum">      19 </span>                : // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
<span class="lineNum">      20 </span>                : // USA.
<span class="lineNum">      21 </span>                : 
<span class="lineNum">      22 </span>                : // As a special exception, you may use this file as part of a free software
<span class="lineNum">      23 </span>                : // library without restriction.  Specifically, if other files instantiate
<span class="lineNum">      24 </span>                : // templates or use macros or inline functions from this file, or you compile
<span class="lineNum">      25 </span>                : // this file and link it with other files to produce an executable, this
<span class="lineNum">      26 </span>                : // file does not by itself cause the resulting executable to be covered by
<span class="lineNum">      27 </span>                : // the GNU General Public License.  This exception does not however
<span class="lineNum">      28 </span>                : // invalidate any other reasons why the executable file might be covered by
<span class="lineNum">      29 </span>                : // the GNU General Public License.
<span class="lineNum">      30 </span>                : 
<span class="lineNum">      31 </span>                : /*
<span class="lineNum">      32 </span>                :  *
<span class="lineNum">      33 </span>                :  * Copyright (c) 1994
<span class="lineNum">      34 </span>                :  * Hewlett-Packard Company
<span class="lineNum">      35 </span>                :  *
<span class="lineNum">      36 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      37 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      38 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      39 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      40 </span>                :  * in supporting documentation.  Hewlett-Packard Company makes no
<span class="lineNum">      41 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      42 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      43 </span>                :  *
<span class="lineNum">      44 </span>                :  *
<span class="lineNum">      45 </span>                :  * Copyright (c) 1996
<span class="lineNum">      46 </span>                :  * Silicon Graphics Computer Systems, Inc.
<span class="lineNum">      47 </span>                :  *
<span class="lineNum">      48 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      49 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      50 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      51 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      52 </span>                :  * in supporting documentation.  Silicon Graphics makes no
<span class="lineNum">      53 </span>                :  * representations about the suitability of this  software for any
<span class="lineNum">      54 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      55 </span>                :  */
<span class="lineNum">      56 </span>                : 
<span class="lineNum">      57 </span>                : /** @file vector.tcc
<span class="lineNum">      58 </span>                :  *  This is an internal header file, included by other library headers.
<span class="lineNum">      59 </span>                :  *  You should not attempt to use it directly.
<span class="lineNum">      60 </span>                :  */
<span class="lineNum">      61 </span>                : 
<span class="lineNum">      62 </span>                : #ifndef _VECTOR_TCC
<span class="lineNum">      63 </span>                : #define _VECTOR_TCC 1
<span class="lineNum">      64 </span>                : 
<span class="lineNum">      65 </span>                : _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
<span class="lineNum">      66 </span>                : 
<span class="lineNum">      67 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">      68 </span>                :     void
<span class="lineNum">      69 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">      70 </span>                :     reserve(size_type __n)
<span class="lineNum">      71 </span>                :     {
<span class="lineNum">      72 </span>                :       if (__n &gt; this-&gt;max_size())
<span class="lineNum">      73 </span>                :         __throw_length_error(__N(&quot;vector::reserve&quot;));
<span class="lineNum">      74 </span>                :       if (this-&gt;capacity() &lt; __n)
<span class="lineNum">      75 </span>                :         {
<span class="lineNum">      76 </span>                :           const size_type __old_size = size();
<span class="lineNum">      77 </span>                :           pointer __tmp = _M_allocate_and_copy(__n,
<span class="lineNum">      78 </span>                :                  _GLIBCXX_MAKE_MOVE_ITERATOR(this-&gt;_M_impl._M_start),
<span class="lineNum">      79 </span>                :                  _GLIBCXX_MAKE_MOVE_ITERATOR(this-&gt;_M_impl._M_finish));
<span class="lineNum">      80 </span>                :           std::_Destroy(this-&gt;_M_impl._M_start, this-&gt;_M_impl._M_finish,
<span class="lineNum">      81 </span>                :                         _M_get_Tp_allocator());
<span class="lineNum">      82 </span>                :           _M_deallocate(this-&gt;_M_impl._M_start,
<span class="lineNum">      83 </span>                :                         this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">      84 </span>                :                         - this-&gt;_M_impl._M_start);
<span class="lineNum">      85 </span>                :           this-&gt;_M_impl._M_start = __tmp;
<span class="lineNum">      86 </span>                :           this-&gt;_M_impl._M_finish = __tmp + __old_size;
<span class="lineNum">      87 </span>                :           this-&gt;_M_impl._M_end_of_storage = this-&gt;_M_impl._M_start + __n;
<span class="lineNum">      88 </span>                :         }
<span class="lineNum">      89 </span>                :     }
<span class="lineNum">      90 </span>                : 
<span class="lineNum">      91 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">      92 </span>                :     typename vector&lt;_Tp, _Alloc&gt;::iterator
<span class="lineNum">      93 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">      94 </span>                :     insert(iterator __position, const value_type&amp; __x)
<span class="lineNum">      95 </span>                :     {
<span class="lineNum">      96 </span>                :       const size_type __n = __position - begin();
<span class="lineNum">      97 </span>                :       if (this-&gt;_M_impl._M_finish != this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">      98 </span>                :           &amp;&amp; __position == end())
<span class="lineNum">      99 </span>                :         {
<span class="lineNum">     100 </span>                :           this-&gt;_M_impl.construct(this-&gt;_M_impl._M_finish, __x);
<span class="lineNum">     101 </span>                :           ++this-&gt;_M_impl._M_finish;
<span class="lineNum">     102 </span>                :         }
<span class="lineNum">     103 </span>                :       else
<span class="lineNum">     104 </span>                :         {
<span class="lineNum">     105 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     106 </span>                :           if (this-&gt;_M_impl._M_finish != this-&gt;_M_impl._M_end_of_storage)
<span class="lineNum">     107 </span>                :             {
<span class="lineNum">     108 </span>                :               _Tp __x_copy = __x;
<span class="lineNum">     109 </span>                :               _M_insert_aux(__position, std::move(__x_copy));
<span class="lineNum">     110 </span>                :             }
<span class="lineNum">     111 </span>                :           else
<span class="lineNum">     112 </span>                : #endif
<span class="lineNum">     113 </span>                :             _M_insert_aux(__position, __x);
<span class="lineNum">     114 </span>                :         }
<span class="lineNum">     115 </span>                :       return iterator(this-&gt;_M_impl._M_start + __n);
<span class="lineNum">     116 </span>                :     }
<span class="lineNum">     117 </span>                : 
<span class="lineNum">     118 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     119 </span>                :     typename vector&lt;_Tp, _Alloc&gt;::iterator
<span class="lineNum">     120 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     121 </span><span class="lineCov">         301695 :     erase(iterator __position)</span>
<span class="lineNum">     122 </span>                :     {
<span class="lineNum">     123 </span><span class="lineCov">        1870066 :       if (__position + 1 != end())</span>
<span class="lineNum">     124 </span><span class="lineCov">        1137908 :         _GLIBCXX_MOVE3(__position + 1, end(), __position);</span>
<span class="lineNum">     125 </span><span class="lineCov">         935033 :       --this-&gt;_M_impl._M_finish;</span>
<span class="lineNum">     126 </span><span class="lineCov">         935033 :       this-&gt;_M_impl.destroy(this-&gt;_M_impl._M_finish);</span>
<span class="lineNum">     127 </span><span class="lineCov">         935033 :       return __position;</span>
<span class="lineNum">     128 </span>                :     }
<span class="lineNum">     129 </span>                : 
<span class="lineNum">     130 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     131 </span>                :     typename vector&lt;_Tp, _Alloc&gt;::iterator
<span class="lineNum">     132 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     133 </span>                :     erase(iterator __first, iterator __last)
<span class="lineNum">     134 </span>                :     {
<span class="lineNum">     135 </span>                :       if (__last != end())
<span class="lineNum">     136 </span>                :         _GLIBCXX_MOVE3(__last, end(), __first);
<span class="lineNum">     137 </span>                :       _M_erase_at_end(__first.base() + (end() - __last));
<span class="lineNum">     138 </span>                :       return __first;
<span class="lineNum">     139 </span>                :     }
<span class="lineNum">     140 </span>                : 
<span class="lineNum">     141 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     142 </span>                :     vector&lt;_Tp, _Alloc&gt;&amp;
<span class="lineNum">     143 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     144 </span><span class="lineNoCov">              0 :     operator=(const vector&lt;_Tp, _Alloc&gt;&amp; __x)</span>
<span class="lineNum">     145 </span>                :     {
<span class="lineNum">     146 </span><span class="lineNoCov">              0 :       if (&amp;__x != this)</span>
<span class="lineNum">     147 </span>                :         {
<span class="lineNum">     148 </span><span class="lineNoCov">              0 :           const size_type __xlen = __x.size();</span>
<span class="lineNum">     149 </span><span class="lineNoCov">              0 :           if (__xlen &gt; capacity())</span>
<span class="lineNum">     150 </span>                :             {
<span class="lineNum">     151 </span>                :               pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(),
<span class="lineNum">     152 </span><span class="lineNoCov">              0 :                                                    __x.end());</span>
<span class="lineNum">     153 </span><span class="lineNoCov">              0 :               std::_Destroy(this-&gt;_M_impl._M_start, this-&gt;_M_impl._M_finish,</span>
<span class="lineNum">     154 </span>                :                             _M_get_Tp_allocator());
<span class="lineNum">     155 </span><span class="lineNoCov">              0 :               _M_deallocate(this-&gt;_M_impl._M_start,</span>
<span class="lineNum">     156 </span>                :                             this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     157 </span>                :                             - this-&gt;_M_impl._M_start);
<span class="lineNum">     158 </span><span class="lineNoCov">              0 :               this-&gt;_M_impl._M_start = __tmp;</span>
<span class="lineNum">     159 </span><span class="lineNoCov">              0 :               this-&gt;_M_impl._M_end_of_storage = this-&gt;_M_impl._M_start + __xlen;</span>
<span class="lineNum">     160 </span>                :             }
<span class="lineNum">     161 </span><span class="lineNoCov">              0 :           else if (size() &gt;= __xlen)</span>
<span class="lineNum">     162 </span>                :             {
<span class="lineNum">     163 </span><span class="lineNoCov">              0 :               std::_Destroy(std::copy(__x.begin(), __x.end(), begin()),</span>
<span class="lineNum">     164 </span>                :                             end(), _M_get_Tp_allocator());
<span class="lineNum">     165 </span>                :             }
<span class="lineNum">     166 </span>                :           else
<span class="lineNum">     167 </span>                :             {
<span class="lineNum">     168 </span><span class="lineNoCov">              0 :               std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),</span>
<span class="lineNum">     169 </span>                :                         this-&gt;_M_impl._M_start);
<span class="lineNum">     170 </span><span class="lineNoCov">              0 :               std::__uninitialized_copy_a(__x._M_impl._M_start + size(),</span>
<span class="lineNum">     171 </span>                :                                           __x._M_impl._M_finish,
<span class="lineNum">     172 </span>                :                                           this-&gt;_M_impl._M_finish,
<span class="lineNum">     173 </span>                :                                           _M_get_Tp_allocator());
<span class="lineNum">     174 </span>                :             }
<span class="lineNum">     175 </span><span class="lineNoCov">              0 :           this-&gt;_M_impl._M_finish = this-&gt;_M_impl._M_start + __xlen;</span>
<span class="lineNum">     176 </span>                :         }
<span class="lineNum">     177 </span><span class="lineNoCov">              0 :       return *this;</span>
<span class="lineNum">     178 </span>                :     }
<span class="lineNum">     179 </span>                : 
<span class="lineNum">     180 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     181 </span>                :     void
<span class="lineNum">     182 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     183 </span>                :     _M_fill_assign(size_t __n, const value_type&amp; __val)
<span class="lineNum">     184 </span>                :     {
<span class="lineNum">     185 </span>                :       if (__n &gt; capacity())
<span class="lineNum">     186 </span>                :         {
<span class="lineNum">     187 </span>                :           vector __tmp(__n, __val, _M_get_Tp_allocator());
<span class="lineNum">     188 </span>                :           __tmp.swap(*this);
<span class="lineNum">     189 </span>                :         }
<span class="lineNum">     190 </span>                :       else if (__n &gt; size())
<span class="lineNum">     191 </span>                :         {
<span class="lineNum">     192 </span>                :           std::fill(begin(), end(), __val);
<span class="lineNum">     193 </span>                :           std::__uninitialized_fill_n_a(this-&gt;_M_impl._M_finish,
<span class="lineNum">     194 </span>                :                                         __n - size(), __val,
<span class="lineNum">     195 </span>                :                                         _M_get_Tp_allocator());
<span class="lineNum">     196 </span>                :           this-&gt;_M_impl._M_finish += __n - size();
<span class="lineNum">     197 </span>                :         }
<span class="lineNum">     198 </span>                :       else
<span class="lineNum">     199 </span>                :         _M_erase_at_end(std::fill_n(this-&gt;_M_impl._M_start, __n, __val));
<span class="lineNum">     200 </span>                :     }
<span class="lineNum">     201 </span>                : 
<span class="lineNum">     202 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     203 </span>                :     template&lt;typename _InputIterator&gt;
<span class="lineNum">     204 </span>                :       void
<span class="lineNum">     205 </span>                :       vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     206 </span>                :       _M_assign_aux(_InputIterator __first, _InputIterator __last,
<span class="lineNum">     207 </span>                :                     std::input_iterator_tag)
<span class="lineNum">     208 </span>                :       {
<span class="lineNum">     209 </span>                :         pointer __cur(this-&gt;_M_impl._M_start);
<span class="lineNum">     210 </span>                :         for (; __first != __last &amp;&amp; __cur != this-&gt;_M_impl._M_finish;
<span class="lineNum">     211 </span>                :              ++__cur, ++__first)
<span class="lineNum">     212 </span>                :           *__cur = *__first;
<span class="lineNum">     213 </span>                :         if (__first == __last)
<span class="lineNum">     214 </span>                :           _M_erase_at_end(__cur);
<span class="lineNum">     215 </span>                :         else
<span class="lineNum">     216 </span>                :           insert(end(), __first, __last);
<span class="lineNum">     217 </span>                :       }
<span class="lineNum">     218 </span>                : 
<span class="lineNum">     219 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     220 </span>                :     template&lt;typename _ForwardIterator&gt;
<span class="lineNum">     221 </span>                :       void
<span class="lineNum">     222 </span>                :       vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     223 </span>                :       _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
<span class="lineNum">     224 </span>                :                     std::forward_iterator_tag)
<span class="lineNum">     225 </span>                :       {
<span class="lineNum">     226 </span>                :         const size_type __len = std::distance(__first, __last);
<span class="lineNum">     227 </span>                : 
<span class="lineNum">     228 </span>                :         if (__len &gt; capacity())
<span class="lineNum">     229 </span>                :           {
<span class="lineNum">     230 </span>                :             pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
<span class="lineNum">     231 </span>                :             std::_Destroy(this-&gt;_M_impl._M_start, this-&gt;_M_impl._M_finish,
<span class="lineNum">     232 </span>                :                           _M_get_Tp_allocator());
<span class="lineNum">     233 </span>                :             _M_deallocate(this-&gt;_M_impl._M_start,
<span class="lineNum">     234 </span>                :                           this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     235 </span>                :                           - this-&gt;_M_impl._M_start);
<span class="lineNum">     236 </span>                :             this-&gt;_M_impl._M_start = __tmp;
<span class="lineNum">     237 </span>                :             this-&gt;_M_impl._M_finish = this-&gt;_M_impl._M_start + __len;
<span class="lineNum">     238 </span>                :             this-&gt;_M_impl._M_end_of_storage = this-&gt;_M_impl._M_finish;
<span class="lineNum">     239 </span>                :           }
<span class="lineNum">     240 </span>                :         else if (size() &gt;= __len)
<span class="lineNum">     241 </span>                :           _M_erase_at_end(std::copy(__first, __last, this-&gt;_M_impl._M_start));
<span class="lineNum">     242 </span>                :         else
<span class="lineNum">     243 </span>                :           {
<span class="lineNum">     244 </span>                :             _ForwardIterator __mid = __first;
<span class="lineNum">     245 </span>                :             std::advance(__mid, size());
<span class="lineNum">     246 </span>                :             std::copy(__first, __mid, this-&gt;_M_impl._M_start);
<span class="lineNum">     247 </span>                :             this-&gt;_M_impl._M_finish =
<span class="lineNum">     248 </span>                :               std::__uninitialized_copy_a(__mid, __last,
<span class="lineNum">     249 </span>                :                                           this-&gt;_M_impl._M_finish,
<span class="lineNum">     250 </span>                :                                           _M_get_Tp_allocator());
<span class="lineNum">     251 </span>                :           }
<span class="lineNum">     252 </span>                :       }
<span class="lineNum">     253 </span>                : 
<span class="lineNum">     254 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     255 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     256 </span>                :     template&lt;typename... _Args&gt;
<span class="lineNum">     257 </span>                :       typename vector&lt;_Tp, _Alloc&gt;::iterator
<span class="lineNum">     258 </span>                :       vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     259 </span>                :       emplace(iterator __position, _Args&amp;&amp;... __args)
<span class="lineNum">     260 </span>                :       {
<span class="lineNum">     261 </span>                :         const size_type __n = __position - begin();
<span class="lineNum">     262 </span>                :         if (this-&gt;_M_impl._M_finish != this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     263 </span>                :             &amp;&amp; __position == end())
<span class="lineNum">     264 </span>                :           {
<span class="lineNum">     265 </span>                :             this-&gt;_M_impl.construct(this-&gt;_M_impl._M_finish,
<span class="lineNum">     266 </span>                :                                     std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     267 </span>                :             ++this-&gt;_M_impl._M_finish;
<span class="lineNum">     268 </span>                :           }
<span class="lineNum">     269 </span>                :         else
<span class="lineNum">     270 </span>                :           _M_insert_aux(__position, std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     271 </span>                :         return iterator(this-&gt;_M_impl._M_start + __n);
<span class="lineNum">     272 </span>                :       }
<span class="lineNum">     273 </span>                : 
<span class="lineNum">     274 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     275 </span>                :     template&lt;typename... _Args&gt;
<span class="lineNum">     276 </span>                :       void
<span class="lineNum">     277 </span>                :       vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     278 </span>                :       _M_insert_aux(iterator __position, _Args&amp;&amp;... __args)
<span class="lineNum">     279 </span>                : #else
<span class="lineNum">     280 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     281 </span>                :     void
<span class="lineNum">     282 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     283 </span><span class="lineCov">       11698820 :     _M_insert_aux(iterator __position, const _Tp&amp; __x)</span>
<span class="lineNum">     284 </span>                : #endif
<span class="lineNum">     285 </span>                :     {
<span class="lineNum">     286 </span><span class="lineCov">       11698820 :       if (this-&gt;_M_impl._M_finish != this-&gt;_M_impl._M_end_of_storage)</span>
<span class="lineNum">     287 </span>                :         {
<span class="lineNum">     288 </span><span class="lineNoCov">              0 :           this-&gt;_M_impl.construct(this-&gt;_M_impl._M_finish,</span>
<span class="lineNum">     289 </span>                :                                   _GLIBCXX_MOVE(*(this-&gt;_M_impl._M_finish
<span class="lineNum">     290 </span>                :                                                   - 1)));
<span class="lineNum">     291 </span><span class="lineNoCov">              0 :           ++this-&gt;_M_impl._M_finish;</span>
<span class="lineNum">     292 </span>                : #ifndef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     293 </span><span class="lineNoCov">              0 :           _Tp __x_copy = __x;</span>
<span class="lineNum">     294 </span>                : #endif
<span class="lineNum">     295 </span><span class="lineNoCov">              0 :           _GLIBCXX_MOVE_BACKWARD3(__position.base(),</span>
<span class="lineNum">     296 </span>                :                                   this-&gt;_M_impl._M_finish - 2,
<span class="lineNum">     297 </span>                :                                   this-&gt;_M_impl._M_finish - 1);
<span class="lineNum">     298 </span>                : #ifndef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     299 </span><span class="lineNoCov">              0 :           *__position = __x_copy;</span>
<span class="lineNum">     300 </span>                : #else
<span class="lineNum">     301 </span>                :           *__position = _Tp(std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     302 </span>                : #endif
<span class="lineNum">     303 </span>                :         }
<span class="lineNum">     304 </span>                :       else
<span class="lineNum">     305 </span>                :         {
<span class="lineNum">     306 </span>                :           const size_type __len =
<span class="lineNum">     307 </span><span class="lineCov">       11698820 :             _M_check_len(size_type(1), &quot;vector::_M_insert_aux&quot;);</span>
<span class="lineNum">     308 </span><span class="lineCov">       11698820 :           pointer __new_start(this-&gt;_M_allocate(__len));</span>
<span class="lineNum">     309 </span><span class="lineCov">       11698820 :           pointer __new_finish(__new_start);</span>
<span class="lineNum">     310 </span>                :           try
<span class="lineNum">     311 </span>                :             {
<span class="lineNum">     312 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     313 </span>                :               this-&gt;_M_impl.construct(__new_start + (__position - begin()),
<span class="lineNum">     314 </span>                :                                       std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     315 </span>                : #endif
<span class="lineNum">     316 </span><span class="lineCov">       35096460 :               __new_finish =</span>
<span class="lineNum">     317 </span>                :                 std::__uninitialized_move_a(this-&gt;_M_impl._M_start,
<span class="lineNum">     318 </span>                :                                             __position.base(), __new_start,
<span class="lineNum">     319 </span>                :                                             _M_get_Tp_allocator());
<span class="lineNum">     320 </span>                : #ifndef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     321 </span><span class="lineCov">       11698820 :               this-&gt;_M_impl.construct(__new_finish, __x);</span>
<span class="lineNum">     322 </span>                : #endif
<span class="lineNum">     323 </span><span class="lineCov">       11698820 :               ++__new_finish;</span>
<span class="lineNum">     324 </span><span class="lineCov">       46795280 :               __new_finish =</span>
<span class="lineNum">     325 </span>                :                 std::__uninitialized_move_a(__position.base(),
<span class="lineNum">     326 </span>                :                                             this-&gt;_M_impl._M_finish,
<span class="lineNum">     327 </span>                :                                             __new_finish,
<span class="lineNum">     328 </span>                :                                             _M_get_Tp_allocator());
<span class="lineNum">     329 </span>                :             }
<span class="lineNum">     330 </span><span class="lineNoCov">              0 :           catch(...)</span>
<span class="lineNum">     331 </span>                :             {
<span class="lineNum">     332 </span><span class="lineNoCov">              0 :               std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator());</span>
<span class="lineNum">     333 </span><span class="lineNoCov">              0 :               _M_deallocate(__new_start, __len);</span>
<span class="lineNum">     334 </span><span class="lineNoCov">              0 :               __throw_exception_again;</span>
<span class="lineNum">     335 </span>                :             }
<span class="lineNum">     336 </span><span class="lineCov">       23397640 :           std::_Destroy(this-&gt;_M_impl._M_start, this-&gt;_M_impl._M_finish,</span>
<span class="lineNum">     337 </span>                :                         _M_get_Tp_allocator());
<span class="lineNum">     338 </span><span class="lineCov">       11698820 :           _M_deallocate(this-&gt;_M_impl._M_start,</span>
<span class="lineNum">     339 </span>                :                         this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     340 </span>                :                         - this-&gt;_M_impl._M_start);
<span class="lineNum">     341 </span><span class="lineCov">       11698820 :           this-&gt;_M_impl._M_start = __new_start;</span>
<span class="lineNum">     342 </span><span class="lineCov">       11698820 :           this-&gt;_M_impl._M_finish = __new_finish;</span>
<span class="lineNum">     343 </span><span class="lineCov">       11698820 :           this-&gt;_M_impl._M_end_of_storage = __new_start + __len;</span>
<span class="lineNum">     344 </span>                :         }
<span class="lineNum">     345 </span><span class="lineCov">       11698820 :     }</span>
<span class="lineNum">     346 </span>                : 
<span class="lineNum">     347 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     348 </span>                :     void
<span class="lineNum">     349 </span>                :     vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     350 </span><span class="lineCov">        3744942 :     _M_fill_insert(iterator __position, size_type __n, const value_type&amp; __x)</span>
<span class="lineNum">     351 </span>                :     {
<span class="lineNum">     352 </span><span class="lineCov">        3744942 :       if (__n != 0)</span>
<span class="lineNum">     353 </span>                :         {
<span class="lineNum">     354 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     355 </span>                :           value_type __x_copy = __x;
<span class="lineNum">     356 </span>                : #endif
<span class="lineNum">     357 </span><span class="lineCov">        3744942 :           if (size_type(this-&gt;_M_impl._M_end_of_storage</span>
<span class="lineNum">     358 </span>                :                         - this-&gt;_M_impl._M_finish) &gt;= __n)
<span class="lineNum">     359 </span>                :             {
<span class="lineNum">     360 </span>                : #ifndef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     361 </span><span class="lineCov">        3741164 :               value_type __x_copy = __x;</span>
<span class="lineNum">     362 </span>                : #endif
<span class="lineNum">     363 </span><span class="lineCov">        3741164 :               const size_type __elems_after = end() - __position;</span>
<span class="lineNum">     364 </span><span class="lineCov">        3741164 :               pointer __old_finish(this-&gt;_M_impl._M_finish);</span>
<span class="lineNum">     365 </span><span class="lineCov">        3741164 :               if (__elems_after &gt; __n)</span>
<span class="lineNum">     366 </span>                :                 {
<span class="lineNum">     367 </span><span class="lineNoCov">              0 :                   std::__uninitialized_move_a(this-&gt;_M_impl._M_finish - __n,</span>
<span class="lineNum">     368 </span>                :                                               this-&gt;_M_impl._M_finish,
<span class="lineNum">     369 </span>                :                                               this-&gt;_M_impl._M_finish,
<span class="lineNum">     370 </span>                :                                               _M_get_Tp_allocator());
<span class="lineNum">     371 </span><span class="lineNoCov">              0 :                   this-&gt;_M_impl._M_finish += __n;</span>
<span class="lineNum">     372 </span><span class="lineNoCov">              0 :                   _GLIBCXX_MOVE_BACKWARD3(__position.base(),</span>
<span class="lineNum">     373 </span>                :                                           __old_finish - __n, __old_finish);
<span class="lineNum">     374 </span><span class="lineNoCov">              0 :                   std::fill(__position.base(), __position.base() + __n,</span>
<span class="lineNum">     375 </span>                :                             __x_copy);
<span class="lineNum">     376 </span>                :                 }
<span class="lineNum">     377 </span>                :               else
<span class="lineNum">     378 </span>                :                 {
<span class="lineNum">     379 </span><span class="lineCov">        7482328 :                   std::__uninitialized_fill_n_a(this-&gt;_M_impl._M_finish,</span>
<span class="lineNum">     380 </span>                :                                                 __n - __elems_after,
<span class="lineNum">     381 </span>                :                                                 __x_copy,
<span class="lineNum">     382 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     383 </span><span class="lineCov">        3741164 :                   this-&gt;_M_impl._M_finish += __n - __elems_after;</span>
<span class="lineNum">     384 </span><span class="lineCov">       11223492 :                   std::__uninitialized_move_a(__position.base(), __old_finish,</span>
<span class="lineNum">     385 </span>                :                                               this-&gt;_M_impl._M_finish,
<span class="lineNum">     386 </span>                :                                               _M_get_Tp_allocator());
<span class="lineNum">     387 </span><span class="lineCov">        3741164 :                   this-&gt;_M_impl._M_finish += __elems_after;</span>
<span class="lineNum">     388 </span><span class="lineCov">        3741164 :                   std::fill(__position.base(), __old_finish, __x_copy);</span>
<span class="lineNum">     389 </span>                :                 }
<span class="lineNum">     390 </span>                :             }
<span class="lineNum">     391 </span>                :           else
<span class="lineNum">     392 </span>                :             {
<span class="lineNum">     393 </span>                :               const size_type __len =
<span class="lineNum">     394 </span><span class="lineCov">           3778 :                 _M_check_len(__n, &quot;vector::_M_fill_insert&quot;);</span>
<span class="lineNum">     395 </span><span class="lineCov">           3778 :               pointer __new_start(this-&gt;_M_allocate(__len));</span>
<span class="lineNum">     396 </span><span class="lineCov">           3778 :               pointer __new_finish(__new_start);</span>
<span class="lineNum">     397 </span>                :               try
<span class="lineNum">     398 </span>                :                 {
<span class="lineNum">     399 </span><span class="lineCov">          11334 :                   __new_finish =</span>
<span class="lineNum">     400 </span>                :                     std::__uninitialized_move_a(this-&gt;_M_impl._M_start,
<span class="lineNum">     401 </span>                :                                                 __position.base(),
<span class="lineNum">     402 </span>                :                                                 __new_start,
<span class="lineNum">     403 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     404 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     405 </span>                :                   std::__uninitialized_fill_n_a(__new_finish, __n, __x_copy,
<span class="lineNum">     406 </span>                : #else
<span class="lineNum">     407 </span><span class="lineCov">           3778 :                   std::__uninitialized_fill_n_a(__new_finish, __n, __x,</span>
<span class="lineNum">     408 </span>                : #endif
<span class="lineNum">     409 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     410 </span><span class="lineCov">           3778 :                   __new_finish += __n;</span>
<span class="lineNum">     411 </span><span class="lineCov">          15112 :                   __new_finish =</span>
<span class="lineNum">     412 </span>                :                     std::__uninitialized_move_a(__position.base(),
<span class="lineNum">     413 </span>                :                                                 this-&gt;_M_impl._M_finish,
<span class="lineNum">     414 </span>                :                                                 __new_finish,
<span class="lineNum">     415 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     416 </span>                :                 }
<span class="lineNum">     417 </span><span class="lineNoCov">              0 :               catch(...)</span>
<span class="lineNum">     418 </span>                :                 {
<span class="lineNum">     419 </span><span class="lineNoCov">              0 :                   std::_Destroy(__new_start, __new_finish,</span>
<span class="lineNum">     420 </span>                :                                 _M_get_Tp_allocator());
<span class="lineNum">     421 </span><span class="lineNoCov">              0 :                   _M_deallocate(__new_start, __len);</span>
<span class="lineNum">     422 </span><span class="lineNoCov">              0 :                   __throw_exception_again;</span>
<span class="lineNum">     423 </span>                :                 }
<span class="lineNum">     424 </span><span class="lineCov">           7556 :               std::_Destroy(this-&gt;_M_impl._M_start, this-&gt;_M_impl._M_finish,</span>
<span class="lineNum">     425 </span>                :                             _M_get_Tp_allocator());
<span class="lineNum">     426 </span><span class="lineCov">           3778 :               _M_deallocate(this-&gt;_M_impl._M_start,</span>
<span class="lineNum">     427 </span>                :                             this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     428 </span>                :                             - this-&gt;_M_impl._M_start);
<span class="lineNum">     429 </span><span class="lineCov">           3778 :               this-&gt;_M_impl._M_start = __new_start;</span>
<span class="lineNum">     430 </span><span class="lineCov">           3778 :               this-&gt;_M_impl._M_finish = __new_finish;</span>
<span class="lineNum">     431 </span><span class="lineCov">           3778 :               this-&gt;_M_impl._M_end_of_storage = __new_start + __len;</span>
<span class="lineNum">     432 </span>                :             }
<span class="lineNum">     433 </span>                :         }
<span class="lineNum">     434 </span><span class="lineCov">        3744942 :     }</span>
<span class="lineNum">     435 </span>                : 
<span class="lineNum">     436 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     437 </span>                :     template&lt;typename _InputIterator&gt;
<span class="lineNum">     438 </span>                :       void
<span class="lineNum">     439 </span>                :       vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     440 </span>                :       _M_range_insert(iterator __pos, _InputIterator __first,
<span class="lineNum">     441 </span>                :                       _InputIterator __last, std::input_iterator_tag)
<span class="lineNum">     442 </span>                :       {
<span class="lineNum">     443 </span>                :         for (; __first != __last; ++__first)
<span class="lineNum">     444 </span>                :           {
<span class="lineNum">     445 </span>                :             __pos = insert(__pos, *__first);
<span class="lineNum">     446 </span>                :             ++__pos;
<span class="lineNum">     447 </span>                :           }
<span class="lineNum">     448 </span>                :       }
<span class="lineNum">     449 </span>                : 
<span class="lineNum">     450 </span>                :   template&lt;typename _Tp, typename _Alloc&gt;
<span class="lineNum">     451 </span>                :     template&lt;typename _ForwardIterator&gt;
<span class="lineNum">     452 </span>                :       void
<span class="lineNum">     453 </span>                :       vector&lt;_Tp, _Alloc&gt;::
<span class="lineNum">     454 </span>                :       _M_range_insert(iterator __position, _ForwardIterator __first,
<span class="lineNum">     455 </span>                :                       _ForwardIterator __last, std::forward_iterator_tag)
<span class="lineNum">     456 </span>                :       {
<span class="lineNum">     457 </span>                :         if (__first != __last)
<span class="lineNum">     458 </span>                :           {
<span class="lineNum">     459 </span>                :             const size_type __n = std::distance(__first, __last);
<span class="lineNum">     460 </span>                :             if (size_type(this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     461 </span>                :                           - this-&gt;_M_impl._M_finish) &gt;= __n)
<span class="lineNum">     462 </span>                :               {
<span class="lineNum">     463 </span>                :                 const size_type __elems_after = end() - __position;
<span class="lineNum">     464 </span>                :                 pointer __old_finish(this-&gt;_M_impl._M_finish);
<span class="lineNum">     465 </span>                :                 if (__elems_after &gt; __n)
<span class="lineNum">     466 </span>                :                   {
<span class="lineNum">     467 </span>                :                     std::__uninitialized_move_a(this-&gt;_M_impl._M_finish - __n,
<span class="lineNum">     468 </span>                :                                                 this-&gt;_M_impl._M_finish,
<span class="lineNum">     469 </span>                :                                                 this-&gt;_M_impl._M_finish,
<span class="lineNum">     470 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     471 </span>                :                     this-&gt;_M_impl._M_finish += __n;
<span class="lineNum">     472 </span>                :                     _GLIBCXX_MOVE_BACKWARD3(__position.base(),
<span class="lineNum">     473 </span>                :                                             __old_finish - __n, __old_finish);
<span class="lineNum">     474 </span>                :                     std::copy(__first, __last, __position);
<span class="lineNum">     475 </span>                :                   }
<span class="lineNum">     476 </span>                :                 else
<span class="lineNum">     477 </span>                :                   {
<span class="lineNum">     478 </span>                :                     _ForwardIterator __mid = __first;
<span class="lineNum">     479 </span>                :                     std::advance(__mid, __elems_after);
<span class="lineNum">     480 </span>                :                     std::__uninitialized_copy_a(__mid, __last,
<span class="lineNum">     481 </span>                :                                                 this-&gt;_M_impl._M_finish,
<span class="lineNum">     482 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     483 </span>                :                     this-&gt;_M_impl._M_finish += __n - __elems_after;
<span class="lineNum">     484 </span>                :                     std::__uninitialized_move_a(__position.base(),
<span class="lineNum">     485 </span>                :                                                 __old_finish,
<span class="lineNum">     486 </span>                :                                                 this-&gt;_M_impl._M_finish,
<span class="lineNum">     487 </span>                :                                                 _M_get_Tp_allocator());
<span class="lineNum">     488 </span>                :                     this-&gt;_M_impl._M_finish += __elems_after;
<span class="lineNum">     489 </span>                :                     std::copy(__first, __mid, __position);
<span class="lineNum">     490 </span>                :                   }
<span class="lineNum">     491 </span>                :               }
<span class="lineNum">     492 </span>                :             else
<span class="lineNum">     493 </span>                :               {
<span class="lineNum">     494 </span>                :                 const size_type __len =
<span class="lineNum">     495 </span>                :                   _M_check_len(__n, &quot;vector::_M_range_insert&quot;);
<span class="lineNum">     496 </span>                :                 pointer __new_start(this-&gt;_M_allocate(__len));
<span class="lineNum">     497 </span>                :                 pointer __new_finish(__new_start);
<span class="lineNum">     498 </span>                :                 try
<span class="lineNum">     499 </span>                :                   {
<span class="lineNum">     500 </span>                :                     __new_finish =
<span class="lineNum">     501 </span>                :                       std::__uninitialized_move_a(this-&gt;_M_impl._M_start,
<span class="lineNum">     502 </span>                :                                                   __position.base(),
<span class="lineNum">     503 </span>                :                                                   __new_start,
<span class="lineNum">     504 </span>                :                                                   _M_get_Tp_allocator());
<span class="lineNum">     505 </span>                :                     __new_finish =
<span class="lineNum">     506 </span>                :                       std::__uninitialized_copy_a(__first, __last,
<span class="lineNum">     507 </span>                :                                                   __new_finish,
<span class="lineNum">     508 </span>                :                                                   _M_get_Tp_allocator());
<span class="lineNum">     509 </span>                :                     __new_finish =
<span class="lineNum">     510 </span>                :                       std::__uninitialized_move_a(__position.base(),
<span class="lineNum">     511 </span>                :                                                   this-&gt;_M_impl._M_finish,
<span class="lineNum">     512 </span>                :                                                   __new_finish,
<span class="lineNum">     513 </span>                :                                                   _M_get_Tp_allocator());
<span class="lineNum">     514 </span>                :                   }
<span class="lineNum">     515 </span>                :                 catch(...)
<span class="lineNum">     516 </span>                :                   {
<span class="lineNum">     517 </span>                :                     std::_Destroy(__new_start, __new_finish,
<span class="lineNum">     518 </span>                :                                   _M_get_Tp_allocator());
<span class="lineNum">     519 </span>                :                     _M_deallocate(__new_start, __len);
<span class="lineNum">     520 </span>                :                     __throw_exception_again;
<span class="lineNum">     521 </span>                :                   }
<span class="lineNum">     522 </span>                :                 std::_Destroy(this-&gt;_M_impl._M_start, this-&gt;_M_impl._M_finish,
<span class="lineNum">     523 </span>                :                               _M_get_Tp_allocator());
<span class="lineNum">     524 </span>                :                 _M_deallocate(this-&gt;_M_impl._M_start,
<span class="lineNum">     525 </span>                :                               this-&gt;_M_impl._M_end_of_storage
<span class="lineNum">     526 </span>                :                               - this-&gt;_M_impl._M_start);
<span class="lineNum">     527 </span>                :                 this-&gt;_M_impl._M_start = __new_start;
<span class="lineNum">     528 </span>                :                 this-&gt;_M_impl._M_finish = __new_finish;
<span class="lineNum">     529 </span>                :                 this-&gt;_M_impl._M_end_of_storage = __new_start + __len;
<span class="lineNum">     530 </span>                :               }
<span class="lineNum">     531 </span>                :           }
<span class="lineNum">     532 </span>                :       }
<span class="lineNum">     533 </span>                : 
<span class="lineNum">     534 </span>                : 
<span class="lineNum">     535 </span>                :   // vector&lt;bool&gt;
<span class="lineNum">     536 </span>                : 
<span class="lineNum">     537 </span>                :   template&lt;typename _Alloc&gt;
<span class="lineNum">     538 </span>                :     void
<span class="lineNum">     539 </span>                :     vector&lt;bool, _Alloc&gt;::
<span class="lineNum">     540 </span>                :     reserve(size_type __n)
<span class="lineNum">     541 </span>                :     {
<span class="lineNum">     542 </span>                :       if (__n &gt; this-&gt;max_size())
<span class="lineNum">     543 </span>                :         __throw_length_error(__N(&quot;vector::reserve&quot;));
<span class="lineNum">     544 </span>                :       if (this-&gt;capacity() &lt; __n)
<span class="lineNum">     545 </span>                :         {
<span class="lineNum">     546 </span>                :           _Bit_type* __q = this-&gt;_M_allocate(__n);
<span class="lineNum">     547 </span>                :           this-&gt;_M_impl._M_finish = _M_copy_aligned(begin(), end(),
<span class="lineNum">     548 </span>                :                                                     iterator(__q, 0));
<span class="lineNum">     549 </span>                :           this-&gt;_M_deallocate();
<span class="lineNum">     550 </span>                :           this-&gt;_M_impl._M_start = iterator(__q, 0);
<span class="lineNum">     551 </span>                :           this-&gt;_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1)
<span class="lineNum">     552 </span>                :                                              / int(_S_word_bit));
<span class="lineNum">     553 </span>                :         }
<span class="lineNum">     554 </span>                :     }
<span class="lineNum">     555 </span>                : 
<span class="lineNum">     556 </span>                :   template&lt;typename _Alloc&gt;
<span class="lineNum">     557 </span>                :     void
<span class="lineNum">     558 </span>                :     vector&lt;bool, _Alloc&gt;::
<span class="lineNum">     559 </span><span class="lineCov">         604368 :     _M_fill_insert(iterator __position, size_type __n, bool __x)</span>
<span class="lineNum">     560 </span>                :     {
<span class="lineNum">     561 </span><span class="lineCov">         604368 :       if (__n == 0)</span>
<span class="lineNum">     562 </span><span class="lineCov">         301672 :         return;</span>
<span class="lineNum">     563 </span><span class="lineCov">         302696 :       if (capacity() - size() &gt;= __n)</span>
<span class="lineNum">     564 </span>                :         {
<span class="lineNum">     565 </span><span class="lineCov">            128 :           std::copy_backward(__position, end(),</span>
<span class="lineNum">     566 </span>                :                              this-&gt;_M_impl._M_finish + difference_type(__n));
<span class="lineNum">     567 </span><span class="lineCov">             64 :           std::fill(__position, __position + difference_type(__n), __x);</span>
<span class="lineNum">     568 </span><span class="lineCov">             64 :           this-&gt;_M_impl._M_finish += difference_type(__n);</span>
<span class="lineNum">     569 </span>                :         }
<span class="lineNum">     570 </span>                :       else
<span class="lineNum">     571 </span>                :         {
<span class="lineNum">     572 </span>                :           const size_type __len = 
<span class="lineNum">     573 </span><span class="lineCov">         302632 :             _M_check_len(__n, &quot;vector&lt;bool&gt;::_M_fill_insert&quot;);</span>
<span class="lineNum">     574 </span><span class="lineCov">         302632 :           _Bit_type * __q = this-&gt;_M_allocate(__len);</span>
<span class="lineNum">     575 </span>                :           iterator __i = _M_copy_aligned(begin(), __position,
<span class="lineNum">     576 </span><span class="lineCov">         302632 :                                          iterator(__q, 0));</span>
<span class="lineNum">     577 </span><span class="lineCov">         302632 :           std::fill(__i, __i + difference_type(__n), __x);</span>
<span class="lineNum">     578 </span><span class="lineCov">         605264 :           this-&gt;_M_impl._M_finish = std::copy(__position, end(),</span>
<span class="lineNum">     579 </span>                :                                               __i + difference_type(__n));
<span class="lineNum">     580 </span><span class="lineCov">         302632 :           this-&gt;_M_deallocate();</span>
<span class="lineNum">     581 </span><span class="lineCov">         302632 :           this-&gt;_M_impl._M_end_of_storage = (__q + ((__len</span>
<span class="lineNum">     582 </span>                :                                                      + int(_S_word_bit) - 1)
<span class="lineNum">     583 </span>                :                                                     / int(_S_word_bit)));
<span class="lineNum">     584 </span><span class="lineCov">         302632 :           this-&gt;_M_impl._M_start = iterator(__q, 0);</span>
<span class="lineNum">     585 </span>                :         }
<span class="lineNum">     586 </span>                :     }
<span class="lineNum">     587 </span>                : 
<span class="lineNum">     588 </span>                :   template&lt;typename _Alloc&gt;
<span class="lineNum">     589 </span>                :     template&lt;typename _ForwardIterator&gt;
<span class="lineNum">     590 </span>                :       void
<span class="lineNum">     591 </span>                :       vector&lt;bool, _Alloc&gt;::
<span class="lineNum">     592 </span>                :       _M_insert_range(iterator __position, _ForwardIterator __first, 
<span class="lineNum">     593 </span>                :                       _ForwardIterator __last, std::forward_iterator_tag)
<span class="lineNum">     594 </span>                :       {
<span class="lineNum">     595 </span>                :         if (__first != __last)
<span class="lineNum">     596 </span>                :           {
<span class="lineNum">     597 </span>                :             size_type __n = std::distance(__first, __last);
<span class="lineNum">     598 </span>                :             if (capacity() - size() &gt;= __n)
<span class="lineNum">     599 </span>                :               {
<span class="lineNum">     600 </span>                :                 std::copy_backward(__position, end(),
<span class="lineNum">     601 </span>                :                                    this-&gt;_M_impl._M_finish
<span class="lineNum">     602 </span>                :                                    + difference_type(__n));
<span class="lineNum">     603 </span>                :                 std::copy(__first, __last, __position);
<span class="lineNum">     604 </span>                :                 this-&gt;_M_impl._M_finish += difference_type(__n);
<span class="lineNum">     605 </span>                :               }
<span class="lineNum">     606 </span>                :             else
<span class="lineNum">     607 </span>                :               {
<span class="lineNum">     608 </span>                :                 const size_type __len =
<span class="lineNum">     609 </span>                :                   _M_check_len(__n, &quot;vector&lt;bool&gt;::_M_insert_range&quot;);
<span class="lineNum">     610 </span>                :                 _Bit_type * __q = this-&gt;_M_allocate(__len);
<span class="lineNum">     611 </span>                :                 iterator __i = _M_copy_aligned(begin(), __position,
<span class="lineNum">     612 </span>                :                                                iterator(__q, 0));
<span class="lineNum">     613 </span>                :                 __i = std::copy(__first, __last, __i);
<span class="lineNum">     614 </span>                :                 this-&gt;_M_impl._M_finish = std::copy(__position, end(), __i);
<span class="lineNum">     615 </span>                :                 this-&gt;_M_deallocate();
<span class="lineNum">     616 </span>                :                 this-&gt;_M_impl._M_end_of_storage = (__q
<span class="lineNum">     617 </span>                :                                                    + ((__len
<span class="lineNum">     618 </span>                :                                                        + int(_S_word_bit) - 1)
<span class="lineNum">     619 </span>                :                                                       / int(_S_word_bit)));
<span class="lineNum">     620 </span>                :                 this-&gt;_M_impl._M_start = iterator(__q, 0);
<span class="lineNum">     621 </span>                :               }
<span class="lineNum">     622 </span>                :           }
<span class="lineNum">     623 </span>                :       }
<span class="lineNum">     624 </span>                : 
<span class="lineNum">     625 </span>                :   template&lt;typename _Alloc&gt;
<span class="lineNum">     626 </span>                :     void
<span class="lineNum">     627 </span>                :     vector&lt;bool, _Alloc&gt;::
<span class="lineNum">     628 </span><span class="lineCov">        6787209 :     _M_insert_aux(iterator __position, bool __x)</span>
<span class="lineNum">     629 </span>                :     {
<span class="lineNum">     630 </span><span class="lineCov">        6787209 :       if (this-&gt;_M_impl._M_finish._M_p != this-&gt;_M_impl._M_end_of_storage)</span>
<span class="lineNum">     631 </span>                :         {
<span class="lineNum">     632 </span><span class="lineNoCov">              0 :           std::copy_backward(__position, this-&gt;_M_impl._M_finish, </span>
<span class="lineNum">     633 </span>                :                              this-&gt;_M_impl._M_finish + 1);
<span class="lineNum">     634 </span><span class="lineNoCov">              0 :           *__position = __x;</span>
<span class="lineNum">     635 </span><span class="lineNoCov">              0 :           ++this-&gt;_M_impl._M_finish;</span>
<span class="lineNum">     636 </span>                :         }
<span class="lineNum">     637 </span>                :       else
<span class="lineNum">     638 </span>                :         {
<span class="lineNum">     639 </span>                :           const size_type __len =
<span class="lineNum">     640 </span><span class="lineCov">        6787209 :             _M_check_len(size_type(1), &quot;vector&lt;bool&gt;::_M_insert_aux&quot;);</span>
<span class="lineNum">     641 </span><span class="lineCov">        6787209 :           _Bit_type * __q = this-&gt;_M_allocate(__len);</span>
<span class="lineNum">     642 </span>                :           iterator __i = _M_copy_aligned(begin(), __position,
<span class="lineNum">     643 </span><span class="lineCov">        6787209 :                                          iterator(__q, 0));</span>
<span class="lineNum">     644 </span><span class="lineCov">        6787209 :           *__i++ = __x;</span>
<span class="lineNum">     645 </span><span class="lineCov">        6787209 :           this-&gt;_M_impl._M_finish = std::copy(__position, end(), __i);</span>
<span class="lineNum">     646 </span><span class="lineCov">        6787209 :           this-&gt;_M_deallocate();</span>
<span class="lineNum">     647 </span><span class="lineCov">        6787209 :           this-&gt;_M_impl._M_end_of_storage = (__q + ((__len</span>
<span class="lineNum">     648 </span>                :                                                      + int(_S_word_bit) - 1)
<span class="lineNum">     649 </span>                :                                                     / int(_S_word_bit)));
<span class="lineNum">     650 </span><span class="lineCov">        6787209 :           this-&gt;_M_impl._M_start = iterator(__q, 0);</span>
<span class="lineNum">     651 </span>                :         }
<span class="lineNum">     652 </span><span class="lineCov">        6787209 :     }</span>
<span class="lineNum">     653 </span>                : 
<span class="lineNum">     654 </span>                : _GLIBCXX_END_NESTED_NAMESPACE
<span class="lineNum">     655 </span>                : 
<span class="lineNum">     656 </span>                : #endif /* _VECTOR_TCC */
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
